<?php
class coba extends CI_Controller{
	
	function index(){
		$this->db->select_max('id_user','id');
		$query = $this->db->get('user');
		//$query = $this->db->query('SELECT * FROM user');
		//$hasil = $query->result();
		//$q1 = $hasil->id;
		//echo $q1;
		foreach ($query->result() as $ind){
			$baru = $ind->id;
		}
		echo $baru;
	}
}
?>